An operating system (OS) is a set of programs which provide for the basic operation of a computer. The operating system is low-level software which, for example, schedules tasks, allocates storage, handles the interface to peripheral hardware, and presents a default interface to a user when no application program is running. The operating system also typically manages memory, controls hard and floppy disk drives, loads and executes programs, provides services to running programs, and provides the user with a means for inputting and outputting information.
The operating system may be split into a kernel and various system programs which use facilities provided by the kernel to perform higher-level house-keeping tasks, often acting as servers in a client-server relationship. The kernel is a program responsible for the machine level operation of the system and connections to hardware devices.
In certain operating systems, for example UNIX, the operating system and kernel have a designated memory address space for their use (e.g. kernel space) and user programs have a different designated memory address space for their use (e.g. user space). The two address spaces usually have different access privileges and protections associated with them. For example, the kernel space is restricted from access by user programs so that the user programs do not have an opportunity to intentionally or accidentally make changes to the kernel space memory that may cause system problems.
At certain times, information is needed to be passed between kernel space and user space. However, a simple memory copy from one location to another is not sufficient because you're dealing with two different address spaces. Rather, a system call is made that interrupts the system and changes system modes that allows data to be transferred from one address space to the other. There is a processing overhead involved with this data transfer operation which for certain executing applications may be detrimental to its performance.
An exemplary situation is when one application (e.g. a monitoring application) is monitoring and evaluating the performance of another application (e.g. a target application). Here, the operating system collects sample data for the monitoring application regarding the performance of the target application. Since the monitoring application executes in user space, system calls and/or interrupts are made in order to transfer data to or from the operating system.
Heavy-weight sampling is a term used to describe when the operating system transfers sample data to the monitoring application every time a sample is collected. Thus, a system call is made for every sample data. Light-weight sampling is a term used to describe when the operating system transfers sample data to the monitoring application after a pre-selected number of samples are collected. Thus, light-weight sampling reduces the number of system calls but when a data transfer is made, a larger amount of data is passed which may itself take additional system resources and time to perform.
The present invention provides a new and useful method and system of transferring data that addresses the above problems.